#ifndef _SYSTEM_K_H_
#define _SYSTEM_K_H_

#include"orbital.h"
#include"system_ho.h"
#include"help.h"

#include"./vrenorm/wrapper.h"//< for fortran code wrapper

//****************************************************************************************
//TODO, the reasonability
/* class System_Tz_WS:public System_Tz<WS_Orbital_Tz,complexd> */
/* { */
/*  public: */
/*   typedef WS_Orbital_Tz OrbitalType; */
/*   typedef complexd DataType; */
/*   typedef TwoBodyMatElement<DataType> TwoBodyMatEle; */
/*   const static int MatEledim;//< dimension of TwoBodyMatEle. */
  
/*  System_Tz_WS(const string & _OrbFile,const string & _MatFile):OrbFile(_OrbFile),MatFile(_MatFile){} */

/*   /// setup orbitals,2B states and 2B mat. */
/*   void setup() */
/*   { */
/*     setupOrbitals(); */
/*     setupTwoBodyStates(); */
/*     setupIndiceIn2BStates(); */
/*     setupTwoBodyMat(); */
/*   } */
/*   void setupOrbitals(); */

/*   ///interface for HF cal. */
/*   complexd get1B(int A,int bra,int ket) const; */
/*   ///interface for HF cal. */
/*   complexd get2B(int A,int a,int b,int c,int d,int J) const; */

/*   void setupTwoBodyMat(); */

/*   vector< vector<complexd> > OneBodyMat; */


/*   void printOrbitals() */
/*   { */
/*     using std::cout; */
/*     using std::endl; */
/*     int totalOrbitals=Orbitals.size(); */
/*     /\* for(int i=0;i<totalOrbitals;i++) *\/ */
/*     /\*   cout<<Orbitals[i].e<<endl; *\/ */
/*     /\* int totalGroups=Groups.size(); *\/ */
/*     /\* for(int i=0;i<totalGroups;i++) *\/ */
/*     /\*   { *\/ */
/*     /\* 	int dim=Groups[i].size(); *\/ */
/*     /\* 	cout<<"=================\n"; *\/ */
/*     /\* 	for(int a=0;a<dim;a++) *\/ */
/*     /\* 	  { *\/ */
/*     /\* 	    for(int b=0;b<dim;b++) *\/ */
/*     /\* 	      { *\/ */
/*     /\* 		int bra=Groups[i][a]; *\/ */
/*     /\* 		int ket=Groups[i][b]; *\/ */
/*     /\* 		cout<<OneBodyMat[bra][ket]<<"\t"; *\/ */
/*     /\* 	      } *\/ */
/*     /\* 	    cout<<endl; *\/ */
/*     /\* 	  } *\/ */
/*     /\* 	cout<<"=================\n"; *\/ */
/*     /\*   } *\/ */
/*   } */
/*  private: */
/*   string OrbFile; */
/*   string MatFile; */
/* }; */



//****************************************************************************************
class System_Tz_K:public System_Tz<K_Orbital_Tz,double>
{
 public:
  typedef K_Orbital_Tz OrbitalType;
  typedef double DataType;
  
 System_Tz_K(int _meshPoints):meshPoints(_meshPoints),labk(_meshPoints),labwk(_meshPoints)
  {
    start_veff_();
  }
  void setup()
  {
    setupOrbitals();
  }
  void setupOrbitals();
  void setupTwoBodyMat();

  void printOrbitals();

  ///hf interface
  double get1B(int A,int bra,int ket) const;
  double get2B(int a,int b,int c,int d,int J) const;
  
  ~System_Tz_K(){end_veff_();}

  int meshPoints;
  vector<double> labk;
  vector<double> labwk;
};

#endif
